<!DOCTYPE html>
<html>
<head>
  <title>Test App</title>
</head>
<body>

<% if request.post? %>
  <ul id="results">
  <% %W(name content privacy country publish_at(1i) publish_at(2i) publish_at(3i)
    publish lock_at(1i) lock_at(2i) lock_at(3i) lock_at(4i) lock_at(5i)).each do |key| %>
    <li data-result-for="<%= key %>"><%= params[:post][key] %></li>
  <% end %>
  </ul>
<% end %>

<form action="/" method="post" id="post">
  <p>
    <label for="post_name">Name</label>
    <input class="string required" id="post_name" name="post[name]" size="50" type="text" />
  </p>

  <p>
    <label for="post_content">Name</label>
    <textarea id="post_content" name="post[content]"></textarea>
  </p>

  <p>
    <label class="radio_buttons required control-label"><abbr title="required">*</abbr> Privacy</label>
    <label class="radio">
      <input checked="checked" class="radio_buttons required" id="post_privacy_private" name="post[privacy]" type="radio" value="private" />private
    </label>
    <label class="radio">
      <input class="radio_buttons required" id="post_privacy_public" name="post[privacy]" type="radio" value="public" />public
    </label>
  </p>

  <p>
    <label class="control-label" for="post_country">Country</label>
    <select id="post_country" name="post[country]">
      <option value=""></option>
      <option value="US">US</option>
      <option value="US">US</option>
    </select>
  </p>

  <p>
    <label class="date optional control-label" for="post_publish_at_1i"> Publish at</label>
    <select class="date optional" id="post_publish_at_1i" name="post[publish_at(1i)]">
      <option value="2007">2007</option>
      <option value="2008">2008</option>
      <option value="2009">2009</option>
      <option value="2010">2010</option>
      <option value="2011">2011</option>
      <option value="2012">2012</option>
      <option value="2013">2013</option>
      <option value="2014">2014</option>
      <option value="2015">2015</option>
      <option value="2016">2016</option>
      <option value="2017">2017</option>
    </select>
    <select class="date optional" id="post_publish_at_2i" name="post[publish_at(2i)]">
      <option value="1">January</option>
      <option value="2">February</option>
      <option value="3">March</option>
      <option value="4">April</option>
      <option value="5">May</option>
      <option value="6">June</option>
      <option value="7">July</option>
      <option value="8">August</option>
      <option value="9">September</option>
      <option value="10">October</option>
      <option value="11">November</option>
      <option value="12">December</option>
    </select>
    <select class="date optional" id="post_publish_at_3i" name="post[publish_at(3i)]">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
      <option value="24">24</option>
      <option value="25">25</option>
      <option value="26">26</option>
      <option value="27">27</option>
      <option value="28">28</option>
      <option value="29">29</option>
      <option value="30">30</option>
      <option value="31">31</option>
    </select>
  </p>

  <p>
    <label class="date optional control-label" for="post_lock_at_1i"> Lock at</label>
    <select class="date optional" id="post_lock_at_1i" name="post[lock_at(1i)]">
      <option value="2007">2007</option>
      <option value="2008">2008</option>
      <option value="2009">2009</option>
      <option value="2010">2010</option>
      <option value="2011">2011</option>
      <option value="2012">2012</option>
      <option value="2013">2013</option>
      <option value="2014">2014</option>
      <option value="2015">2015</option>
      <option value="2016">2016</option>
      <option value="2017">2017</option>
    </select>
    <select class="date optional" id="post_lock_at_2i" name="post[lock_at(2i)]">
      <option value="1">January</option>
      <option value="2">February</option>
      <option value="3">March</option>
      <option value="4">April</option>
      <option value="5">May</option>
      <option value="6">June</option>
      <option value="7">July</option>
      <option value="8">August</option>
      <option value="9">September</option>
      <option value="10">October</option>
      <option value="11">November</option>
      <option value="12">December</option>
    </select>
    <select class="date optional" id="post_lock_at_3i" name="post[lock_at(3i)]">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
      <option value="24">24</option>
      <option value="25">25</option>
      <option value="26">26</option>
      <option value="27">27</option>
      <option value="28">28</option>
      <option value="29">29</option>
      <option value="30">30</option>
      <option value="31">31</option>
    </select>
    &mdash;
    <select class="datetime optional" id="post_lock_at_4i" name="post[lock_at(4i)]">
      <option value="00">00</option>
      <option value="01">01</option>
      <option value="02">02</option>
      <option value="03">03</option>
      <option value="04">04</option>
      <option value="05">05</option>
      <option value="06">06</option>
      <option value="07">07</option>
      <option value="08">08</option>
      <option value="09">09</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
    </select> :
    <select class="datetime optional" id="post_lock_at_5i" name="post[lock_at(5i)]">
      <option value="00">00</option>
      <option value="01">01</option>
      <option value="02">02</option>
      <option value="03">03</option>
      <option value="04">04</option>
      <option value="05">05</option>
      <option value="06">06</option>
      <option value="07">07</option>
      <option value="08">08</option>
      <option value="09">09</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
      <option value="24">24</option>
      <option value="25">25</option>
      <option value="26">26</option>
      <option value="27">27</option>
      <option value="28">28</option>
      <option value="29">29</option>
      <option value="30">30</option>
      <option value="31">31</option>
      <option value="32">32</option>
      <option value="33">33</option>
      <option value="34">34</option>
      <option value="35">35</option>
      <option value="36">36</option>
      <option value="37">37</option>
      <option value="38">38</option>
      <option value="39">39</option>
      <option value="40">40</option>
      <option value="41">41</option>
      <option value="42">42</option>
      <option value="43">43</option>
      <option value="44">44</option>
      <option value="45">45</option>
      <option value="46">46</option>
      <option value="47">47</option>
      <option value="48">48</option>
      <option value="49">49</option>
      <option value="50">50</option>
      <option value="51">51</option>
      <option value="52">52</option>
      <option value="53">53</option>
      <option value="54">54</option>
      <option value="55">55</option>
      <option value="56">56</option>
      <option value="57">57</option>
      <option value="58">58</option>
      <option value="59">59</option>
    </select>
  </p>

  <p>
    <label class="boolean optional control-label" for="post_publish"> Publish</label>
    <div class="controls">
      <input name="post[publish]" type="hidden" value="0" />
      <label class="checkbox">
        <input checked="checked" class="boolean optional" id="post_publish" name="post[publish]" type="checkbox" value="1" />
      </label>
    </div>
  </p>

  <p>
    <input name="commit" type="submit" value="Create" />
  </p>
</form>

<table id="click_link_inside_row">
  <tr>
    <td>Some</td>
    <td><a href="#">Link</a></td>
  </tr>
  <tr>
    <td>Hello</td>
    <td><a href="/click_link_inside_row">World</a></td>
  </tr>
</table>

</body>
</html>
